package models

type Config struct {
	Username          string `yaml:"username"`
	Password          string `yaml:"password"`
	Host              string `yaml:"host"`
	MySQLPort         string `yaml:"mysql_port"`
	ExpiredDay        string `yaml:"expired_day"`
	CurrentDay        string `yaml:"current_day"`
	BackupPath        string `yaml:"backup_data_path"`
	LogPath           string `yaml:"backup_log_path"`
	BinlogPath        string `yaml:"backup_binlog_path"`
	LogFile           string `yaml:"backup_log_file"`
	BinlogPathFileSrc string `yaml:"binlog_pathfile_src"`
	BinlogFile        string `yaml:"backup_binlog_file"`
	Innobackupex      string `yaml:"innobackupex"`
	Xtrabackup        string `yaml:"xtrbackup"`
	MyCnf             string `yaml:"mycnf"`
	MySock            string `yaml:"mysock"`
	Parallel          string `yaml:"parallel"`
}

// 定义相关操作方法存放到接口中
type BackupService interface {
	CheckAndCreateDirectories(directories []string, binlogFile string) error //创建目录
	CheckXtarPid() bool                                                      //检查是否存在备份进程
	CheckDevUsage()                                                          //检查磁盘使用率
	BackupDatabase()                                                         //全量备份
	BackupBinlog()                                                           //binlog备份
}
